body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #3f51b5;
}

.loader {
    position: relative;
    display: flex;
}

.loader span {
    display: block;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    margin: 0 5px;
    box-shadow: 0 2px 2px rgba(0,0,0,.2);
}

.loader span:not(:last-child) {
    animation: animate 1s linear infinite;
}

.loader span:last-child {
    animation: jump 1s ease-in-out infinite;
}

@keyframes animate {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(30px);
    }
}

@keyframes jump {
    0% {
        transform: translate(0,0);
    }
    10% {
        transform: translate(10px,-10px);
    }
    20% {
        transform: translate(20px,10px);
    }
    30% {
        transform: translate(30px,-50px);
    }
    70% {
        transform: translate(-150px,-50px);
    }
    80% {
        transform: translate(-140px,10px);
    }
    90% {
        transform: translate(-130px,-10px);
    }
    100% {
        transform: translate(-120px,0);
    }
}
